From: Keir Fraser Date: Tue, 29 Jan 2008 11:47:42 +0000 (+0000) Subject: x86: Fix HVM hypercall preemption causing guest crash. X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~14360 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=c8e525b16bc6752f710b649c5a8d5ea706fde747;p=xen.git x86: Fix HVM hypercall preemption causing guest crash. Signed-off-by: Yu Zhao --- diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c index d7478c178b..618542f20f 100644 --- a/xen/arch/x86/domain.c +++ b/xen/arch/x86/domain.c @@ -1506,7 +1506,12 @@ unsigned long hypercall_create_continuation( { regs = guest_cpu_user_regs(); regs->eax = op; - regs->eip -= 2; /* re-execute 'syscall' / 'int 0x82' */ + /* + * For PV guest, we update EIP to re-execute 'syscall' / 'int 0x82'; + * HVM does not need this since 'vmcall' / 'vmmcall' is fault-like. + */ + if ( !is_hvm_vcpu(current) ) + regs->eip -= 2; /* re-execute 'syscall' / 'int 0x82' */ #ifdef __x86_64__ if ( !is_hvm_vcpu(current) ?